<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="time">
    2019-8-5
</div>
<script>
    var times = document.getElementById('time');
    console.log(times);
    console.dir(times); //打印返回的元素对象更好的查看里面的属性和方法
</script>
</body>
</html>